# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: dai9ah <dai9ah@protonmail.com>
pkgname=xsel
pkgver=1.2.0_git20190821
pkgrel=0
pkgdesc="Command-line program for manipulating the X selection"
url="http://www.vergenet.net/~conrad/software/xsel"
arch="all"
license="MIT"
makedepends="libxt-dev autoconf automake libtool"
subpackages="$pkgname-doc"
_commit=ef01f3c72a195dbce682184c842b81b17d7d7ad1
source="$pkgname-$pkgver.tar.gz::https://github.com/kfish/xsel/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	./xsel --help > /dev/null
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="b95648cc203b915c6288e44d0615b92dd7740f58447db2ff99f74cdb08353d63bb15327199a22a70776301d7c0670cba3297a86b4bdea68ed89c8484b839205c  xsel-1.2.0_git20190821.tar.gz"
